<?php 

/**
* 控制基类
*/
class Controller extends Smarty
{
	public function __construct()
	{
		//配置samrty  对象链方式
		$this->setTemplateDir('./views')
		       ->setCompileDir('./runtime/views_c')
		       ->setConfigDir('./configs')
		       ->setCacheDir('./runtime/caches');
		// 配置 模版变量定界符  <{  }>
		$this->left_delimiter = "<{";
		$this->right_delimiter = "}>";
		// 配置缓存
		$this->caching = false;//开启缓存
		$this->cache_lifetime = 30;//缓存 +10s
	}
    public function __call($fun,$params)
    {
    	header("HTTP/1.0 404 NOT FOUND");
    	header("Status: 404 NOT FOUND");
    	echo "<h1>404 NOT FOUND 方法不存在</h1>";
    	exit();
    }
    
}